package com.huiminpay.merchant.api;

import com.huiminpay.common.cache.domain.BusinessException;
import com.huiminpay.merchant.dto.AppDTO;
import com.huiminpay.merchant.dto.MerchantDto;

import java.util.List;

public interface AppService {
    /**
     * 创造应用
     * @param merchantId
     * @param app
     * @return
     * @throws BusinessException
     */
    public AppDTO createApp(Long merchantId, AppDTO app) throws BusinessException;

    /**
     * 根据商户id 查询该商户下的应用列表
     * @param merchantId
     * @return
     * @throws BusinessException
     */
    List<AppDTO> queryAppByMerchantId(Long merchantId) throws BusinessException;

    /**
     * 根据appId查询应用 详情
     * @param id
     * @return
     * @throws BusinessException
     */
    AppDTO selectAppById(String id) throws BusinessException;
    /**
     \* 查询应用是否属于某个商户
     \* @param appId
     \* @param merchantId
     \* @return
     */
    Boolean queryAppInMerchant(String appId, Long merchantId);
}
